Optimal. Leaf size=25 \[ \sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a} \tan (x)}{\sqrt{a \sec ^2(x)}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0148376, antiderivative size = 25, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3, Rules used = {4122, 217, 206} \[ \sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a} \tan (x)}{\sqrt{a \sec ^2(x)}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4122
Rule 217
Rule 206
Rubi steps
\begin{align*} \int \sqrt{a \sec ^2(x)} \, dx &=a \operatorname{Subst}\left (\int \frac{1}{\sqrt{a+a x^2}} \, dx,x,\tan (x)\right )\\ &=a \operatorname{Subst}\left (\int \frac{1}{1-a x^2} \, dx,x,\frac{\tan (x)}{\sqrt{a \sec ^2(x)}}\right )\\ &=\sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a} \tan (x)}{\sqrt{a \sec ^2(x)}}\right )\\ \end{align*}
Mathematica [A] time = 0.0078522, size = 46, normalized size = 1.84 \[ \cos (x) \sqrt{a \sec ^2(x)} \left (\log \left (\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )\right )-\log \left (\cos \left (\frac{x}{2}\right )-\sin \left (\frac{x}{2}\right )\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.056, size = 23, normalized size = 0.9 \begin{align*} -2\,\cos \left ( x \right ){\it Artanh} \left ({\frac{-1+\cos \left ( x \right ) }{\sin \left ( x \right ) }} \right ) \sqrt{{\frac{a}{ \left ( \cos \left ( x \right ) \right ) ^{2}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.93595, size = 51, normalized size = 2.04 \begin{align*} \frac{1}{2} \, \sqrt{a}{\left (\log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \sin \left (x\right ) + 1\right ) - \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \sin \left (x\right ) + 1\right )\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.46416, size = 171, normalized size = 6.84 \begin{align*} \left [-\frac{1}{2} \, \sqrt{\frac{a}{\cos \left (x\right )^{2}}} \cos \left (x\right ) \log \left (-\frac{\sin \left (x\right ) - 1}{\sin \left (x\right ) + 1}\right ), -\sqrt{-a} \arctan \left (\frac{\sqrt{-a} \sqrt{\frac{a}{\cos \left (x\right )^{2}}} \cos \left (x\right ) \sin \left (x\right )}{a}\right )\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a \sec ^{2}{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.34264, size = 42, normalized size = 1.68 \begin{align*} \frac{1}{4} \, \sqrt{a}{\left (\log \left ({\left | \frac{1}{\sin \left (x\right )} + \sin \left (x\right ) + 2 \right |}\right ) - \log \left ({\left | \frac{1}{\sin \left (x\right )} + \sin \left (x\right ) - 2 \right |}\right )\right )} \mathrm{sgn}\left (\cos \left (x\right )\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]